package com.cip.master.dao.impl;

import java.util.List;

import com.cip.admin.dao.impl.CipHibernateDAOSupport;
import com.cip.master.dao.AlbumDAO;
import com.cip.master.model.Album;

public class AlbumDAOImpl extends CipHibernateDAOSupport implements AlbumDAO {

	public Album saveOrUpdate(Album album) {
		getHibernateTemplate().saveOrUpdate(album);
		return album;
	}

	public List<Album> getAllAlbum() throws Exception {
		return getCipHibernateTemplate().loadAll(Album.class);	
	}

	public Album getAlbum(int id) {
		return getHibernateTemplate().get(Album.class, id);
	}

}
